//
//  SearchTableViewCell.m
//  B段项目
//
//  Created by 高哲 on 15/11/6.
//  Copyright © 2015年 谢美娜. All rights reserved.
//

#import "SearchTableViewCell.h"
#import "Header.h"
@implementation SearchTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        _iconImageView = [[UIImageView alloc] init];
        [self.contentView addSubview:_iconImageView];
        
        _nameLable = [[myContectLabel alloc] init];
        [self.contentView addSubview:_nameLable];
    }
    return self;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    
    _iconImageView.frame = CGRectMake(20 * FitWidth, 20 * FitHeight, 30 * FitWidth, 30 * FitHeight);
    _nameLable.frame = CGRectMake(_iconImageView.frame.size.width + _iconImageView.frame.origin.x + 10 * FitWidth, _iconImageView.frame.origin.y, 270 * FitWidth, 30 * FitHeight);
}

- (void)setRadioModel:(GZ_RadioModel *)radioModel
{
    if ([radioModel.myType integerValue] == 17) {
        _iconImageView.image = [UIImage imageNamed:@"GZbofang.png"];
    }else{
        
        _iconImageView.image = [UIImage imageNamed:@"GZshu.png"];
    }
    _nameLable.text = radioModel.title;
}



/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
